package cn.tannn.ops.ssh.controller.dto;

import cn.tannn.jdevelops.result.bean.SerializableBean;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 服务器ssh连接信息
 *
 * @author tnnn
 * @version V1.0
 * @date 2024-9-10
 */
@Schema(description = "新增服务器ssh连接信息")
@ToString
@Getter
@Setter
public class SshInfoAdd extends SerializableBean<SshInfoAdd> {


    /**
     * 服务器名
     */
    @Schema(description = "服务器名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String name;


    /**
     * 服务器密码
     */
    @Schema(description = "服务器密码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String password;


    /**
     * ssh连接端口[默认22]
     */
    @Schema(description = "ssh连接端口[默认22]", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull
    private Integer port;


    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;


    /**
     * 服务器ip[默认127.0.0.1]
     */
    @Schema(description = "服务器ip[默认127.0.0.1]", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String url;


    /**
     * 服务账号[默认root]
     */
    @Schema(description = "服务账号[默认root]", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String username;

}
